package com.jingdong.callback.model;

import java.util.Map;

/**
 * 回调结果
 * 
 * @author SDK Team
 */
public class CallbackResult {
    
    /**
     * 是否成功
     */
    private boolean success;
    
    /**
     * 消息
     */
    private String message;
    
    /**
     * 响应数据
     */
    private Map<String, Object> data;
    
    /**
     * 是否被防重复跳过
     */
    private boolean deduplicated = false;
    
    // Constructors
    
    public CallbackResult() {
    }
    
    public CallbackResult(boolean success, String message) {
        this.success = success;
        this.message = message;
    }
    
    public CallbackResult(boolean success, String message, Map<String, Object> data) {
        this.success = success;
        this.message = message;
        this.data = data;
    }
    
    // Getters and Setters
    
    public boolean isSuccess() {
        return success;
    }
    
    public void setSuccess(boolean success) {
        this.success = success;
    }
    
    public String getMessage() {
        return message;
    }
    
    public void setMessage(String message) {
        this.message = message;
    }
    
    public Map<String, Object> getData() {
        return data;
    }
    
    public void setData(Map<String, Object> data) {
        this.data = data;
    }
    
    public boolean isDeduplicated() {
        return deduplicated;
    }
    
    public void setDeduplicated(boolean deduplicated) {
        this.deduplicated = deduplicated;
    }
    
    @Override
    public String toString() {
        return "CallbackResult{" +
                "success=" + success +
                ", message='" + message + '\'' +
                ", data=" + data +
                ", deduplicated=" + deduplicated +
                '}';
    }
}
